SET( LIB_NAME OpenIG-PluginBase )
SET( HEADER_PATH ${PROJECT_SOURCE_DIR}/Core-PluginBase )
ADD_DEFINITIONS( -DIGPLUGINCORE_LIBRARY )

SET( LIB_PUBLIC_HEADERS
    ${HEADER_PATH}/Config.h
    ${HEADER_PATH}/Export.h
    ${HEADER_PATH}/IGPluginCore.h
    ${HEADER_PATH}/Plugin.h
    ${HEADER_PATH}/PluginContext.h
    ${HEADER_PATH}/PluginHost.h
    ${HEADER_PATH}/PluginOperation.h
)

SET( _IgPluginCoreSourceFiles
    PluginHost.cpp
)

INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})

ADD_LIBRARY( ${LIB_NAME} SHARED
    ${LIB_PUBLIC_HEADERS}
    ${_IgPluginCoreSourceFiles}
)

TARGET_LINK_LIBRARIES( ${LIB_NAME}
    ${OSG_LIBRARIES}
    ${Boost_LIBRARIES}
    OpenIG-Base
)

SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES VERSION ${OPENIG_VERSION} )
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES SOVERSION ${OPENIG_VERSION} )
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES PROJECT_LABEL "Core PluginBase" )
SET_TARGET_PROPERTIES (${target} PROPERTIES DEFINE_SYMBOL  "IGPLUGINCORE_LIBRARY")

INCLUDE( ModuleInstall REQUIRED )
